package rpg.writer.scripts.impl;

import java.io.File;
import java.io.IOException;
import java.util.List;

import rpg.engine.model.World;
import rpg.util.io.Files;
import rpg.writer.scripts.ScriptTool;
import rpg.writer.scripts.ScriptWarning;
import rpg.writer.scripts.WorldWithWarnings;

public class ScriptToolPlay {
	public static void main(String[] args) throws IOException {
		List<String> lines = Files.readLines(new File("scripts/test_script_0f.txt"));
		System.out.println(lines.size() + " lines read.");
		
		WorldWithWarnings www = ScriptTool.parse(lines);
		
		for (ScriptWarning w : www.getWarnings())  {
			System.out.println(w);
		}
		
		World world = www.getWorld();
		System.out.println(world);
	}
}
